package com.fengmi.goods.controller;


import com.fengmi.goods.entity.MallGoodsSku;
import com.fengmi.goods.service.IMallGoodsSkuService;
import com.fengmi.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 商品表 前端控制器
 * </p>
 *
 * @author zhuxm
 * @since 2022-03-02
 */
@RestController
@RequestMapping("/goods/sku")
public class MallGoodsSkuController {

    @Autowired
    private IMallGoodsSkuService mallGoodsSkuService;


    @RequestMapping("findSkuById")
    public MallGoodsSku findSkuById(String skuId){

        MallGoodsSku byId = mallGoodsSkuService.getById(skuId);
        return byId;

    }

    @RequestMapping("kcc")
    public ResultVO kcc (String skuId,Integer buyNum){

        return mallGoodsSkuService.kcc(skuId,buyNum);
    }

}
